An example of encoding method for encoding images of multiple viewpoints such as 3D (Dimension) images includes MVC (Multiview Video Coding) method and the like which is extension of AVC (Advanced Video Coding) (H.264/AVC) method.
In the MVC method, an image which is to be encoded is a color image having a value corresponding to light from a subject as a pixel value, and each of the color images of multiple viewpoints is encoded, as necessary, by looking referring to not only the color image of the view point in question but also color images of the other viewpoints.
More specifically, in the MVC method, one of color images of multiple viewpoints is adopted as a Base View image, and a color image of another viewpoint is adopted as a Dependent View image.
The color image of the Base View is encoded by referring to only the Base View image, and a color image of a Dependent View is encoded by referring to not only the image of the Dependent View in question but also images of other views as necessary.
More specifically, for the color image of the Dependent View, parallax prediction for generating a prediction image is performed as necessary by referring to a color image of another view, and the color image of the Dependent View is encoded using the prediction image.
In this case, suppose that a viewpoint #1 is Base View, and another viewpoint #2 is Dependent View.
In the MVC method, when parallax prediction for the color image of the viewpoint #2 is done by referring to the color image of the viewpoint #1, and encoding (prediction encoding) is done using a prediction image obtained from the parallax prediction, a parallax vector representing parallax of a target block which is a macro block of which horizontal and vertical sizes are, e.g., 16 by 16 pixels in an encoding target of the color image of the viewpoint #2 with respect to the color image of the viewpoint #1 is detected.
Further, in the MVC method, a prediction vector obtained by predicting the parallax vector of the target block is derived, and a residual vector which is difference between the parallax vector and the prediction vector is encoded.
In the MVC method, the amount of codes of the residual vector tends to increase as the residual vector is larger, and therefore, when the magnitude of the residual vector is small, i.e., when the prediction accuracy of the prediction vector is high (the prediction vector is more similar to the parallax vector), the encoding efficiency can be improved.
By the way, in recent years, for example, specification such as MPEG3DV method is being defined as an encoding method that employs, as images of multiple viewpoints, not only each image of each viewpoint but also a parallax information image having, as pixel values, parallax information about parallax for each pixel of the color image of each viewpoint and encodes the color image of each viewpoint and the parallax information image of each viewpoint.
In MPEG3DV method, each of the color image of each viewpoint and the parallax information image of each viewpoint is, in principle, encoded like the MVC method.
In the MVC method, for a color image, the prediction vector (of the parallax vector) of the target block is derived from the parallax vectors of the blocks around the target block, but likewise, a method has been suggested to derive the prediction vector of the parallax vector for the parallax information image (for example, see Non-Patent Document 1).